<!--运维管理-->
<template>
    <div style="overflow: hidden">
        <div style="position: fixed;width: 100%;background: #fff;z-index: 99;">
            <bar text="运维管理"></bar>
        </div>
        <div class="list" v-for="(item,index) in listData" :key="item.id" @click="jumpOne(index,item.idx,item.inx)">
            <div style="display: flex;justify-content: flex-start">
                <div class="flag">
                    <img :src="item.noSrc" alt="" style="width: 100%;height: 100%;">
                </div>
                <div class="flagName">{{item.name}}</div>
            </div>
            <div class="row">
                <img src="../../assets/imgs/home/noRow.png" alt="" style="width: 100%;height: 100%;">
            </div>
        </div>
    </div>
</template>

<script>
    import bar from "../../components/topBar";

    export default {
        name: "mochaItom",
        props: {},
        components: {
            bar
        },
        data() {
            return {
                // check:true,
                listData: [
                    {
                        src: require('../../assets/imgs/home/one.png'),
                        noSrc: require('../../assets/imgs/home/noOne.png'),
                        name: '识别器',
                    },
                    {
                        src: require('../../assets/imgs/home/two.png'),
                        noSrc: require('../../assets/imgs/home/noTwo.png'),
                        name: '安防',
                    },
                    {
                        src: require('../../assets/imgs/home/three.png'),
                        noSrc: require('../../assets/imgs/home/noThree.png'),
                        name: '电梯',
                    },
                    {
                        src: require('../../assets/imgs/home/four.png'),
                        noSrc: require('../../assets/imgs/home/noFour.png'),
                        name: '保洁',
                    },
                    {
                        src: require('../../assets/imgs/home/five.png'),
                        noSrc: require('../../assets/imgs/home/noFive.png'),
                        name: '保安',
                    }
                ]
            }

        },
        methods: {
            jumpOne(index) {
                if (index == 0) {
                    this.$router.push({path: "/map", query: {autity: '5'}})
                } else if (index == 1) {
                    this.$router.push({path: "/map", query: {autity: '4'}})
                } else if (index == 2) {
                    this.$router.push({path: "/map", query: {autity: '3'}})
                } else if (index == 3) {
                    this.$router.push({path: "/map", query: {autity: '2'}})
                } else if (index == 4) {
                    this.$router.push({path: "/map", query: {autity: '1'}})
                }
            }
        }

    }
</script>

<style scoped lang="scss">
    .list {
        width: 345px;
        height: 70px;
        margin: auto;
        margin-top: 50px;
        border-bottom: 1px solid #E1E1E1;
        padding: 10px 20px;
        box-sizing: border-box;
        display: flex;
        justify-content: space-between;
        /*background-color: #42b983;*/
        .flag {
            width: 17px;
            height: 18px;
            margin-top: 18px;
        }

        .flagName {
            font-size: 15px;
            font-weight: 400;
            color: rgba(102, 102, 102, 1);
            line-height: 55px;
            margin-left: 17px;
        }

        .row {
            width: 10px;
            height: 19px;
            margin-top: 18px;
        }

    }
</style>
